#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main(){
	int m = 0, n = 0, i = 0;
	double s = 0;
	scanf("%d %d", &m, &n);

	for (i = m; i <= n; ++i){
		s += i*i + 1.0 / i;
	}
	printf("sum = %.6lf", s);
	return 0;
}